#ifndef SERIAL_H_
#define SERIAL_H_

#include <termios.h>
#include <unistd.h>

#ifndef FALSE
#define FALSE 0
#endif

#ifndef TRUE
#define TRUE 1
#endif

class CSerial
{
public:
	CSerial();
	~CSerial();
	int SerialOpen(const char * portName, int baudRate, int parity, int dataBit, int stopBit );
	int GetFd();

private:
	int _SerialClose();
	int fd;
	struct termios oldPort;
	struct termios newPort;
	
};

#endif//SERIAL_H_
